<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .box01 {
            width: 100px;
            height: 100px;
            background-color: skyblue;
        }
    </style>
</head>

<body>

    <div id="box">


    </div>


    <script src="./js/react.js"></script>
    <script src="./js/react-dom.js"></script>
    <script src="./js/babel.min.js"></script>

    <script type="text/babel">

        const msg = "hello";
        const s = {
            "width": "20px",
            "height": "20px",
            "backgroundColor": "red"
        }

        function fn(){
            console.log("fn");
        }

        const age = 12;

        const book = (<div>
            <h1>书籍:{msg}</h1>

            <div style={{ "width": "20px", "height": "20px", "backgroundColor": "blue" }} ></div>
            <div style={s} ></div>
            <div className="box01" ></div>
            {/*dddd*/}
            <input type="radio" id="nv"  /> <label htmlFor="nv">女</label>
            <input type="radio"  />男
            
            <input type="button" value="按钮" onClick={fn} />
            <p>{age>=18?"已成年":"未成年"}</p>            

        </div>)

        ReactDOM.render(book, document.getElementById("box"));


    </script>
</body>

</html>